using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;

using Zwms.Data.Base;

namespace Zwms.Data.BusinessObjects
{
    [DataContract]
    public partial class BaseGood : BusinessBase<string>
    {
        #region Declarations

        private string _barCode = String.Empty;
        private string _singleGoodsCode = String.Empty;
        private string _companyCode = String.Empty;
        private string _companyName = String.Empty;
        private string _goodsName = String.Empty;
        private string _goodsUnit = String.Empty;
        private string _shortName = String.Empty;
        private string _categoryCode = String.Empty;
        private string _categoryName = String.Empty;
        private string _goodTypeCode = String.Empty;
        private string _goodTypeName = String.Empty;
        private int _specs = default(Int32);
        private string _model = String.Empty;
        private decimal _costPrice = default(Decimal);
        private decimal _retailPrice = default(Decimal);
        private string _manufactoryName = String.Empty;
        private string _uPCBarCode = String.Empty;
        private decimal _pieceWeight = default(Decimal);
        private decimal _goodsWeight = default(Decimal);
        private string _weightUnit = String.Empty;
        private decimal _goodsLength = default(Decimal);
        private decimal _goodsWidth = default(Decimal);
        private decimal _goodsHeight = default(Decimal);
        private string _lengthUnit = String.Empty;
        private decimal _pieceVolume = default(Decimal);
        private decimal _goodsVolume = default(Decimal);
        private string _volumeUnit = String.Empty;
        private decimal _pieceNetContent = default(Decimal);
        private string _createUserCode = String.Empty;
        private string _createUserName = String.Empty;
        private string _createDate = String.Empty;
        private string _createTime = String.Empty;
        private string _editUserCode = String.Empty;
        private string _editUserName = String.Empty;
        private string _editDate = String.Empty;
        private string _editTime = String.Empty;
        private string _isDeactived = String.Empty;
        private string _remark = String.Empty;



        #endregion

        #region Constructors

        public BaseGood() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.Append(this.GetType().FullName);
            sb.Append(_barCode);
            sb.Append(_singleGoodsCode);
            sb.Append(_companyCode);
            sb.Append(_companyName);
            sb.Append(_goodsName);
            sb.Append(_goodsUnit);
            sb.Append(_shortName);
            sb.Append(_categoryCode);
            sb.Append(_categoryName);
            sb.Append(_goodTypeCode);
            sb.Append(_goodTypeName);
            sb.Append(_specs);
            sb.Append(_model);
            sb.Append(_costPrice);
            sb.Append(_retailPrice);
            sb.Append(_manufactoryName);
            sb.Append(_uPCBarCode);
            sb.Append(_pieceWeight);
            sb.Append(_goodsWeight);
            sb.Append(_weightUnit);
            sb.Append(_goodsLength);
            sb.Append(_goodsWidth);
            sb.Append(_goodsHeight);
            sb.Append(_lengthUnit);
            sb.Append(_pieceVolume);
            sb.Append(_goodsVolume);
            sb.Append(_volumeUnit);
            sb.Append(_createUserCode);
            sb.Append(_createUserName);
            sb.Append(_createDate);
            sb.Append(_createTime);
            sb.Append(_editUserCode);
            sb.Append(_editUserName);
            sb.Append(_editDate);
            sb.Append(_editTime);
            sb.Append(_isDeactived);
            sb.Append(_remark);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

        [DataMember]
        public virtual string BarCode
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_barCode))
                {
                    return _barCode.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _barCode = value;
            }
        }

        [DataMember]
        public virtual string SingleGoodsCode
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_singleGoodsCode))
                {
                    return _singleGoodsCode.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _singleGoodsCode = value;
            }
        }

        [DataMember]
        public virtual string CompanyCode
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_companyCode))
                {
                    return _companyCode.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _companyCode = value;
            }
        }

        [DataMember]
        public virtual string CompanyName
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_companyName))
                {
                    return _companyName.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _companyName = value;
            }
        }

        [DataMember]
        public virtual string GoodsName
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_goodsName))
                {
                    return _goodsName.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _goodsName = value;
            }
        }


        [DataMember]
        public virtual string GoodsUnit
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_goodsUnit))
                {
                    return _goodsUnit.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _goodsUnit = value;
            }
        }

        [DataMember]
        public virtual string ShortName
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_shortName))
                {
                    return _shortName.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _shortName = value;
            }
        }

        [DataMember]
        public virtual string CategoryCode
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_categoryCode))
                {
                    return _categoryCode.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _categoryCode = value;
            }
        }

        [DataMember]
        public virtual string CategoryName
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_categoryName))
                {
                    return _categoryName.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _categoryName = value;
            }
        }

        [DataMember]
        public virtual string GoodTypeCode
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_goodTypeCode))
                {
                    return _goodTypeCode.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _goodTypeCode = value;
            }
        }

        [DataMember]
        public virtual string GoodTypeName
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_goodTypeName))
                {
                    return _goodTypeName.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _goodTypeName = value;
            }
        }

        [DataMember]
        public virtual int Specs
        {
            get
            {
                return _specs;
            }
            set
            {
                _specs = value;
            }
        }

        [DataMember]
        public virtual string Model
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_model))
                {
                    return _model.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _model = value;
            }
        }

        [DataMember]
        public virtual decimal CostPrice
        {
            get
            {
                return _costPrice;
            }
            set
            {
                _costPrice = value;
            }
        }

        [DataMember]
        public virtual decimal RetailPrice
        {
            get
            {
                return _retailPrice;
            }
            set
            {
                _retailPrice = value;
            }
        }

        [DataMember]
        public virtual string ManufactoryName
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_manufactoryName))
                {
                    return _manufactoryName.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _manufactoryName = value;
            }
        }

        [DataMember]
        public virtual string UPCBarCode
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_uPCBarCode))
                {
                    return _uPCBarCode.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _uPCBarCode = value;
            }
        }

        [DataMember]
        public virtual decimal PieceWeight
        {
            get
            {
                return _pieceWeight;
            }
            set
            {
                _pieceWeight = value;
            }
        }

        [DataMember]
        public virtual decimal GoodsWeight
        {
            get
            {
                return _goodsWeight;
            }
            set
            {
                _goodsWeight = value;
            }
        }

        [DataMember]
        public virtual string WeightUnit
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_weightUnit))
                {
                    return _weightUnit.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _weightUnit = value;
            }
        }

        [DataMember]
        public virtual decimal GoodsLength
        {
            get
            {
                return _goodsLength;
            }
            set
            {
                _goodsLength = value;
            }
        }

        [DataMember]
        public virtual decimal GoodsWidth
        {
            get
            {
                return _goodsWidth;
            }
            set
            {
                _goodsWidth = value;
            }
        }

        [DataMember]
        public virtual decimal GoodsHeight
        {
            get
            {
                return _goodsHeight;
            }
            set
            {
                _goodsHeight = value;
            }
        }

        [DataMember]
        public virtual string LengthUnit
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_lengthUnit))
                {
                    return _lengthUnit.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _lengthUnit = value;
            }
        }

        [DataMember]
        public virtual decimal PieceVolume
        {
            get
            {
                return _pieceVolume;
            }
            set
            {
                _pieceVolume = value;
            }
        }

        [DataMember]
        public virtual decimal GoodsVolume
        {
            get
            {
                return _goodsVolume;
            }
            set
            {
                _goodsVolume = value;
            }
        }

        [DataMember]
        public virtual string VolumeUnit
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_volumeUnit))
                {
                    return _volumeUnit.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _volumeUnit = value;
            }
        }


        [DataMember]
        public virtual decimal PieceNetContent
        {
            get
            {
                return _pieceNetContent;
            }
            set
            {
                _pieceNetContent = value;
            }
        }

        [DataMember]
        public virtual string CreateUserCode
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_createUserCode))
                {
                    return _createUserCode.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _createUserCode = value;
            }
        }

        [DataMember]
        public virtual string CreateUserName
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_createUserName))
                {
                    return _createUserName.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _createUserName = value;
            }
        }

        [DataMember]
        public virtual string CreateDate
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_createDate))
                {
                    return _createDate.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _createDate = value;
            }
        }

        [DataMember]
        public virtual string CreateTime
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_createTime))
                {
                    return _createTime.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _createTime = value;
            }
        }

        [DataMember]
        public virtual string EditUserCode
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_editUserCode))
                {
                    return _editUserCode.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _editUserCode = value;
            }
        }

        [DataMember]
        public virtual string EditUserName
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_editUserName))
                {
                    return _editUserName.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _editUserName = value;
            }
        }

        [DataMember]
        public virtual string EditDate
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_editDate))
                {
                    return _editDate.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _editDate = value;
            }
        }

        [DataMember]
        public virtual string EditTime
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_editTime))
                {
                    return _editTime.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _editTime = value;
            }
        }

        [DataMember]
        public virtual string IsDeactived
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_isDeactived))
                {
                    return _isDeactived.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _isDeactived = value;
            }
        }

        [DataMember]
        public virtual string Remark
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_remark))
                {
                    return _remark.TrimEnd();
                }
                else
                {
                    return "";
                }
            }
            set
            {
                _remark = value;
            }
        }

        #endregion
    }
}